# -*-  coding:utf-8 -*- 
# Author : lihongliang

a = (i for i in range(10))

#一步一步取值      无值时报错
# print(next(a))
# print(next(a))
# print(next(a))

# 循环方式取值  无值时报错
# # 循环方式一
# while True:
#     print(next(a))

# 循环方式二  不报错，没有next
for i in a:
    print(i)



